-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file: Support reading EFI zboot images #53
base: master
Are you sure you want to change the base?
Conversation
7a06c90
to
0a6bc2f
Compare
ecleankernel/file.py
Outdated
image = f.read(size) | ||
|
||
return self.read_version_from_raw(io.BytesIO(image)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you're prereading it, rather than calling self.read_version_from_raw
on the seeked file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gzip.decompress
throws when it tries to read past the end of the payload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we instead modify read_version_from_raw()
and related functions to take an optional size
?
Oh, and we're going to need a test for this file format. |
0a6bc2f
to
367ca82
Compare
367ca82
to
a3e6ca0
Compare
All done. |
This type of image is generated when the kernel has
CONFIG_EFI_ZBOOT
enabled.